package com.ahocorasick.service;

import com.ahocorasick.model.SensitiveWords;
import com.ahocorasick.service.impl.SensitiveWordServiceImpl;
import org.ahocorasick.trie.Emit;

import java.util.Collection;

public interface SensitiveWordService {

    /**
     * 匹配敏感词
     * @param text
     * @return
     */
//   Collection<Emit> findSensitiveWords(String text);
    Collection<SensitiveWordServiceImpl.SensitiveWordResult> findSensitiveWords(String text);

    /**
     * 添加敏感词
     * @param sensitiveWords
     */
   void addSensitiveWord(SensitiveWords sensitiveWords);

    /**
     * 删除敏感词
     * @param sensitiveWords
     */
   void deleteSensitiveWord(SensitiveWords sensitiveWords);
}
